@file:Suppress(
    "PackageDirectoryMismatch",
    "RestrictedApi",
    "StaticFieldLeak"
)//基于AppCompatDelegateImpl所以同包

package androidx.appcompat.app

import android.view.Window
import androidx.annotation.StyleRes
import com.sea.base.ext.global.singleApplication

/**
 * 此处仅借用AppCompatDelegateImpl的inflate逻辑
 */
internal object ApplicationInflaterHelper :
    AppCompatDelegateImpl(singleApplication, null as? Window?, null) {

    fun installFactory(@StyleRes defThemeStyleId: Int) {
        //application的Theme是系统默认的，此处同步到基theme上
        singleApplication.theme.applyStyle(defThemeStyleId, true)
        installViewFactory()
    }
}